package com.lening.gateway.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

/**
 * @ToDo:
 * @Author：杨军
 * @date: 2024/06/14 16:17
 */
@Configuration
public class WebClientConfiguration {
    @LoadBalanced
    @Bean
    public WebClient.Builder webClientBuilder() {
        return WebClient.builder();
    }

    @Bean
    public WebClient webClient(){
        return webClientBuilder().build();
    }
}